create sequence trans_seq 
start with 1 
increment by 1 
nomaxvalue; 



create or replace trigger trans_autoincrement
	before insert on TRANSACCIONES
	for each row
begin
	if :NEW.TR_ID  = 0 then 
   		select trans_seq.nextval into :new.TR_ID from dual;
 	 end if; 
	
end;